<div id="visits_spark" style="width:100%;height:90px;"></div>
<script type="text/javascript">
  visits_spark = Morris.Line({
    element: 'visits_spark',
    xkey: 'date',
    data: <%=@data[@range][:visits_page_views_plot].to_json%>,
    ykeys: ['visits', 'page_views'],
    labels: ['Visits', 'Page Views'],
    xLabelFormat: function(x){return '';},
    yLabelFormat: function(x){return '';},
    hoverCallback: function(i,x){return x.data[i].date + '<br/>' + 'Page Views: ' + x.data[i].page_views + '<br/>Visits: ' + x.data[i].visits;},
    ymax: 'auto',
    ymin: 0,
    smooth: true,
    hideHover: 'auto',
    parseTime: false,
    lineWidth: 2,
    pointSize: 0,
    grid: false,
    pointFillColors: ['#fff'],
    pointStrokeColors: ['#000']
  });
</script>
